import request from '@/utils/request'

// 查询科室列表
export function listdepartment(query) {
  return request({
    url: '/his/department/list',
    method: 'get',
    params: query
  })
}

// 查询科室详细
export function getPost(departmentId) {
  return request({
    url: '/his/department/' + departmentId,
    method: 'get'
  })
}

// 新增科室
export function addPost(data) {
  return request({
    url: '/his/department/addDepartment',
    method: 'post',
    data: data
  })
}

// 修改科室
export function updatePost(data) {
  return request({
    url: '/his/department',
    method: 'put',
    data: data
  })
}

// 删除科室
export function delPost(departmentId) {
  return request({
    url: '/his/department/' + departmentId,
    method: 'delete'
  })
}

// 导出岗位
export function exportPost(query) {
  return request({
    url: '/system/post/export',
    method: 'get',
    params: query
  })
}
